package com.xiaoshou.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaoshou.pojo.Client;
import com.xiaoshou.pojo.Lectures;
import com.xiaoshou.pojo.User;
import com.xiaoshou.util.MyUUID;

@Service
@Transactional
public class LecturesService extends BaseService{

	public void saveLectures(User user, Lectures lecture, String hospitalname) {
		/*if(getClientDao().findClientByHospitalName(hospitalname)==null){
			Client c = new Client();
			c.setId(MyUUID.createUUID().toString());
			c.setHospitalname(hospitalname);
			getClientDao().save(c);//saveOrUpdate(c);
			lecture.setClient(c);
			//getClientDao().saveClient(c);
		}else {
			Client c = getClientDao().findClientByHospitalName(hospitalname);
			lecture.setClient(c);
		}
		lecture.setUser(user);
		lecture.setId(MyUUID.createUUID().toString());
		//getLecturesDao().save(lecture);
		getLecturesDao().saveLecture(lecture);//getSession().saveOrUpdate(lecture);
*/	}

}
